package cn.ztuo.bitrade.dao;

import cn.ztuo.bitrade.entity.ContractCoin;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.querydsl.QueryDslPredicateExecutor;

import java.util.List;


public interface ContractCoinMapper extends JpaRepository<ContractCoin, String>, JpaSpecificationExecutor<ContractCoin>, QueryDslPredicateExecutor<ContractCoin> {
    ContractCoin findBySymbol(String symbol);

    @Query("select a from  ContractCoin a where a.enable = 0")
    List<ContractCoin> findBaseSymbol();

    ContractCoin findById(Integer id);
}
